package com.hefei.dao;


import com.hefei.entity.CustInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CustInfoMapper {

    //查询全部客户信息
    @Select("select * from cust_info")
    List<CustInfo> findAll();

    @Insert("insert into cust_info (cust_no,cust_name,cust_level,create_time,last_modify_time,delete_flag) values (#{custNo},#{custName},#{custLevel},#{createTime},#{lastModifyTime},#{deleteFlag})")
    int add(CustInfo custInfo);

    @Delete("delete from cust_info where cust_no = #{custNo}")
    int delete(String custNo);
}
